-- GENERATED SPELL FOR [Crimson Priest] --


function spell0_10423(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(15586,pUnit)
pUnit:RegisterEvent('Sorts_10423', 3500, 1)
end

function spell1_10423(pUnit, Event) --@Holy Fire,n/a--
pUnit:FullCastSpellOnTarget(17142,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10423', 13000, 1)
end

function spell2_10423(pUnit, Event) --@Holy Smite,n/a--
pUnit:FullCastSpellOnTarget(15238,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10423', 2500, 1)
end

function spell3_10423(pUnit, Event) --@Power Word: Shield,n/a--
pUnit:FullCastSpellOnTarget(17139,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10423', 30335, 1)
end

function Sorts_10423(pUnit, Event)
local choix_sorts_10423 = math.random(0, 3)
if choix_sorts_10423 == 0 then
pUnit:RegisterEvent('spell0_10423', 1, 1)
end
if choix_sorts_10423 == 1 then
pUnit:RegisterEvent('spell1_10423', 1, 1)
end
if choix_sorts_10423 == 2 then
pUnit:RegisterEvent('spell2_10423', 1, 1)
end
if choix_sorts_10423 == 3 then
pUnit:RegisterEvent('spell3_10423', 1, 1)
end
end

function mob10423_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10423', math.random(1500, 3000), 1)
end

function mob10423_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10423_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10423_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10423, 1, 'mob10423_Action')
RegisterUnitEvent(10423, 2, 'mob10423_Leave')
RegisterUnitEvent(10423, 3, 'mob10423_Kill')
RegisterUnitEvent(10423, 4, 'mob10423_Die')
